package Euler40;

public class Champernowne {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		String num = "";
		long count = 1;
		long exp = 1;
		
		System.out.println("Working...");
		
		while(num.length()<=1000001)
		{
			num += count;
			count++;
		}
		
		for(int i = 0; i < 7; i++)
		{
			exp *= Integer.parseInt(String.valueOf(num.charAt((int)Math.pow(10, i)-1)));
		}
		
		System.out.println(exp);
	}
}
